@use 'sass:map';
$sizes: (
  'large': 960px,
  'normal': 800px,
  'medium': 640px,
  'small': 400px,
  'edit': 480px,
  'xs': 540px,
  'auto': auto,
);
@mixin dialog-style {
  &:not(.dialog-scroll) {
    .el-dialog {
      display: flex;
      flex-direction: column;
      margin:0 !important;
      position:absolute;
      top:50%;
      left:50%;
      transform:translate(-50%,-50%);
    }
  }
  .el-dialog__header {
    padding: 0px;
    padding-bottom: 0px;
  }
  .el-dialog__body {
    padding: 24px 24px 24px 24px !important;
  }
  .el-dialog__headerbtn {
    top: 24px;
    z-index: 10;
    .el-dialog__close {
      color: #999;
      font-size: 16px;
    }
  }
  .dialog-footer {
    .ok {
      width: 120px;
      font-size: 16px;
      padding: 8px 20px;
    }
    .cancel-btn-style {
      font-size: 14px;
      padding: 8px 20px;
      margin-left: 16px !important;
    }
  }
  .transfer {
    display: flex;
    .transfer-title {
      height: 48px;
      font-size:14px;
      font-weight:500;
      display: flex;
      background-color: #F5F5FB;
      font-family: PingFangSC-Medium, PingFang SC;
      color: #141C3D;
      align-items: center;
      .el-checkbox {
        margin-right: 12px;
      }
    }
    .transfer-left {
      width: 200px !important;
    }
    .transfer-center {
      left: 37.5% !important;
      width: 24% !important;
      .transfer-center-item {
        .el-button {
          border:1px solid rgba(221,221,221,1);
          background-color: #fff;
          color: #666666;
          padding: 8px 22px;
        }
      }
    }
    .transfer-right {
      width: 200px !important;
    }
    .el-tree-node__label {
      font-size: 14px;
    }
    .el-tree-node {
      margin: 10px 0;
    }
  }
  .transfer-diy-empty {
    .el-tree__empty-block {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      height: 250px;
      position: relative;
      &::before {
        content: '';
        display: block;
        width: 56px;
        height: 56px;
        background: url('../assets/empty-data-icon.png') no-repeat;
        background-size: 100% 100%;
      }
      span {
        font-size: 14px;
        color: #A9AFB6;
      }
      .el-tree__empty-text {
        margin-top:40px;
      }
    }
  }
}
@each $s in map-keys($sizes) {
  .#{$s}-common-dialog-size{
    .el-dialog {
      border-radius: 8px !important;
      width: map-get($sizes, $s) !important;
    }
    @include dialog-style;
  }
}
.common-dailog-style {
  @include dialog-style;
}

.global-dailog-style {
  @include dialog-style;
  .el-dialog {
    border-radius: 8px !important;
  }
}
// 删除弹框UI
.del-message {
  width: 400px !important;
  // height: 290px;
  border-radius: 12px !important;
  padding-bottom: 16px !important;
  .el-message-box__header {
    padding-top: 32px !important;
    padding-bottom: 10px;
    .el-icon-close {
      color: #999;
    }
  }
  .el-message-box__title {
    .del-icon {
      width: 88px;
      height: 88px;
      border-radius: 50%;
      background: url('../assets/hint.png') center no-repeat;
      background-size: 100% auto;
    }
  }
  .el-message-box__headerbtn {
    top: 16px;
    .el-message-box__close {
      color: #999;
      font-size: 16px;
    }
  }
  .el-message-box__content {
    padding-top: 12px;
    font-size: 20px;
    color: #333;
    font-weight: 700;
    max-height: 60vh;
    overflow-y: auto;
  }
// 只有确定按钮
  .el-message-box__btns {
    padding-top: 17px;
    .el-button--primary {
      min-width: 80px;
      height: 32px;
      border-radius: 4px;
      font-size: 14px;
      font-weight: 500;
      color: white;
      margin: 0;
      line-height: 20px;
    }
  }
}
// 确认框UI
.success-message {
  .el-message-box__title {
    .success-icon {
      width: 88px;
      height: 88px;
      border-radius: 50%;
      background: url('../assets/supplier/check-one.png') center no-repeat;
      background-size: 100% auto;
    }
  }
}
.mobile-message {
  width: 90% !important;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
// 有确定和取消按钮
.del-message-cancel {
  .el-message-box__btns {
    .el-button--default:first-child {
      margin-right: -178px;
      min-width: 80px;
      height: 32px;
      border-radius: 4px;
      font-size: 14px;
      font-weight: 400;
      color: #406eff;
      line-height: 20px;
      background: #EFF3FB;
      border: none;
    }
  }
}
.message-react-btn {
  .el-button--primary {
    width: auto !important;
  }
  .el-button--default:first-child {
    width: auto !important;
    margin-right: -260px !important;
  }
}


.dialog-size-auto {
  .el-dialog {
    width: auto !important;
  }
}

.el-dialog__headerbtn {
  .el-icon-close {
    position: absolute;
    right: -56px;
    top: -28px;
    font-size: 25px !important;
    color: #ddd !important;
  }
  .el-icon-close:hover {
    color: #fff !important;
  }
}
// 错误提示框
.error-message {
  width: 400px !important;
  border-radius: 12px !important;
  padding-bottom: 16px !important;
  // 只有确定按钮
  .el-message-box__btns {
    padding-top: 17px;
    .el-button--primary {
      min-width: 120px;
      height: 32px;
      border-radius: 4px;
      font-size: 14px;
      font-weight: 500;
      color: white;
      margin: 0;
      line-height: 20px;
    }
  }
  .el-message-box__message {
    max-height: 300px;
    @include scrollBar($x: hidden, $y: scroll);
  }
}
.http-error-message{
  overflow: auto !important;
  .el-message__content {
    line-height: 1.2;
  }
}
.help-notify-msg {
  width: 470px !important;
  overflow: visible !important;
  border-radius: 16px !important;
  &.mobile-message {
    width: 90% !important;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
  }
  .el-message-box__header {
    padding: 0 !important;
    .el-message-box__headerbtn {
      font-size: 22px;
      right: -38px !important;
      top: 0 !important;
    }
    .el-message-box__close {
      color: #ddd !important;
    }
  }
  .el-message-box__message {
    padding: 0 !important;
  }
  .help-msg-main {
    position: relative;
    .notify-icon {
      position: absolute;
      width: 107px;
      top: -29px;
      right: 25px;
    }
  }
  .help-msg-header {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    padding: 32px 24px 16px 24px;
    background-size: cover;
  }
  .help-msg-content {
    // padding: 0 24px;
    margin: 0 24px;
    max-height: calc(100vh - 150px - 70px);
    word-break: break-all;
    @include scrollBar($x: hidden, $y: auto, $width: 6px);
  }
  .el-message-box__content {
    font-size: 14px;
    padding: 0 !important;
  }

  .el-message-box__btns {
    display: none !important;
  }
}

.process-drawer-bg {
  background-color: #fafbff !important;
}
